// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * 项目等级类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2023-03-08
 */
public enum RegionEnum {
    WPCNJ("1000", "WPCNJ"),
    WSCNJ("1500", "WSCNJ"),
    SWTNJ("11NJ", "SWTNJ");

    private String value;

    private String name;

    RegionEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(String value) {
        RegionEnum arrObj[] = RegionEnum.values();
        for (RegionEnum obj : arrObj) {
            if (StringUtils.equals(value, obj.getValue())) {
                return obj.getName();
            }
        }
        return " ";
    }

    public static String getValueByName(String name) {
        RegionEnum arrObj[] = RegionEnum.values();
        for (RegionEnum obj : arrObj) {
            if (StringUtils.equals(name,obj.getName())) {
                return obj.getValue();
            }
        }
        return "";
    }
}
